package com.nbot.server.service;

import com.nbot.common.command.BaseCommand;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

//@Component
public class Consumer {
    // 使用JmsListener配置消费者监听的队列，其中text是接收到的消息
    @JmsListener(destination = "mytest.queue")
    public void receiveQueue(BaseCommand baseCommand) {
        if(!(baseCommand instanceof BaseCommand)){

        }else {
            System.out.println("Consumer收到的报文为:"+baseCommand.toString());
        }
    }
}